package top.kaoshanji.p1ch01a;

/**
 * author kaoshanji
 * ^_^
 * create time 2024/12/16 17:54
 */
public class Title {

    public String generate(String name, String gender) {

        String title = "";
        switch (gender) {
            case "男":
                title = name + " 先生";
                break;
            case "女":
                title = name + " 女士";
                break;
            default:
                title = name;
        }

        return title;
    }

}
